/*
 * exceptions.h
 *
 *  Created on: 2008-11-5
 *      Author: fanliangliang
 */

#ifndef EXCEPTIONS_H_
#define EXCEPTIONS_H_

#include <exception>

class BaseException : public std::exception {
public:
	explicit BaseException(const string& what = "") throw()
	:_what(what) {
	}

	virtual ~BaseException() throw() {
	}

	virtual const char* what() const throw() {
		return _what.c_str();
	}

private:
	string _what;
};

struct XmlException : public BaseException {
	explicit XmlException(const string& what = "") throw()
	:BaseException(what) {
	}
};

#endif /* EXCEPTIONS_H_ */
